package task11;

import java.util.Scanner;

/**
 * @author banana
 * 猜数字游戏
 */
public class Task2_14 {
    public static void main(String[] args) {
        int x= (int)(Math.random()*10)+1;
        System.out.println("随机数已产生！");
        Scanner sc=new Scanner(System.in);
        int mun=sc.nextInt();
        while(x!=mun){
            if(mun>x){
                System.out.println("猜大了！");
            }else{
                System.out.println("猜小了！");
            }
            System.out.println("继续猜吧！");
            mun=sc.nextInt();
        }
        System.out.println("恭喜你猜对了");
    }

  public class Car {

  }
}
